Echo canceller in a communication system at a terminal

ABSTRACT

A terminal in a communication system includes emitting and receiving transducers and an echo processor having an adaptive echo canceler that processes a residual echo output from the adaptive echo canceler.

The present invention concerns in general terms a device for processingthe echo in a communication system. More particularly, it concerns asystem for processing the echo at a terminal comprising a firsttransducer receiving a signal comprising a part due to the activity of adistant user and a second transducer emitting a signal comprising auseful part due to the activity of a local user. Generally, theactivities of the users in question are voice activities, the said firsttransducer being a loudspeaker and the said second transducer being amicrophone. It is often a case of allowing a comfortable “hands-free”telephone conversation, that is to say one enabling a user to movefreely in a room without having to be burdened with a handset or otherdevice.

One of the major problems posed by this type of “hands-free” telephoneconversation relates to the phenomenon of echo which results from thefact that the microphone and loudspeaker are not completely acousticallydecoupled. In other words, the sound emitted by the loudspeaker isreflected on the walls of the room, on furniture, or even on peoplemoving in the room, and is thus picked up by the microphone.

This problem is conventionally resolved by using an adaptive echocancellation device adapted to calculate, from the signal received bythe loudspeaker, an estimation of an echo part of the signal emitted bythe microphone and to correct the latter accordingly.

Such an adaptive echo cancellation device uses a modelling of thepulse-type response of the system consisting of the loudspeaker, theroom where the “hands-free” conversation is taking place and themicrophone. Conventionally, this modelling is done by adjusting thecoefficients of a finite pulse response filter having a certain number Lof coefficients.

After an initial convergence period, the coefficients of the adaptivefilter generally converge towards those of the Wiener filter with Lcoefficients minimising the mean value of the power of the filteringerror.

Devices of this type are those, for example, to which reference is madein Chapter 4.2 (“Sub-band Acoustic Echo Canceller” of the article“Achieving the control of the acoustic echo in audio terminals” by A.Gilloire and J. F. Zurcher, which appeared in 1988 in Signal ProcessingIV—Theories and Applications, on pages 491 to 494, or in Chapter 5(“Adaptive Echo Compensation”) of the article “The hands-free telephoneproblem—An annotated bibliography” by Eberhard Hänsler, which appearedin 1992 in Signal Processing, on pages 259 to 271.

However, as is indicated in the latter document, the number ofcoefficients required to effect the modelling is very high andconsequently the computing capacity required to use such a device isextremely heavy.

However, given the economic constraints imposed for the marketing ofsuch a device, the number of coefficients of the filter must be limitedto a value compatible with the processing and memory capacities of thetarget digital signal processor (DSP). This number is generally lessthan the number of coefficients required for achieving effectivecancellation of the echo.

Consequently, a sometimes audible residual echo will remain in themajority of applications.

The subject matter of the present invention is therefore in particular aprocessing for eliminating or at least attenuating the said residualecho so that it is no longer audible.

It has already been proposed to provide, at the input and output of theterminal, a device for processing the residual echo based on thevariation in the reception and transmission gains.

The general principle of the processing of the echo based on thevariation of the reception and transmission gains is well-known. It isdescribed, for example, in Chapter 4.1 (“Efficient Gain VariationScheme”) in the article “Achieving the control of the acoustic echo inaudio terminals”, mentioned above. It is a case first of all ofattenuating the signal emitted during a period of voice activity of thedistant user and the voice inactivity of the local user. Thetransmission gain is therefore reduced when such a situation isdetected. Thus the residual echo liable to be transmitted in return isattenuated until it disappears. Moreover, when a period of voiceactivity of the local user is detected, more precisely at the momentwhen the latter begins to speak, the transmission gain is allowed toreturn to 1 and the reception gain is reduced in order to minimise theacoustic coupling between the transducers. In the case of dual speechthat is to say when the two users are speaking at the same time,priority will be given to the direction of transmission for which thesignal has the highest energy level.

This known type of device for processing residual echo based on thevariation in reception and transmission gains poses a certain number ofproblems.

When the coupling between transducers is high, this device can result ina quasi-alternating conversation. The starts and ends of voice sequencesare often truncated. All this takes place to the detriment of theintelligibility and interactivity of the conversation.

Likewise, when it is difficult to have a priori knowledge of thecharacteristics of the acoustic coupling between transducers, forexample in the case of a room where many people are moving about, it isvery difficult to obtain a sufficiently precise and rapid adjustment ofthe parameters participating in the calculation of the transmission andreception gains and consequently to allow a true simultaneousconversation.

When there is a high level of background noise, in particular when thisbackground noise has characteristics of voice activity, the conversationmay take place in only one direction to the detriment of the distantuser.

Other significant problems result from the presence of a backgroundnoise in the acoustic environment of the local user. This is because theconventional residual echo processing device based on variation intransmission and reception gains then causes effects such as noisecontrasts, speech chopping phenomena or noise pumping effects.

It has been proposed, in order to resolve this last type of problem, totransmit to the distant user a synthetic comfort noise at the momentswhen the residual echo signal is present on the transmission channel.Such a solution is described for example in the article “A networkspeech echo canceller with comfort noise” by D. J. Jones, S. D. Watson,K. G. Evans, B. M. G. Gheetham and R. A. Reeves, which appeared in 1997in the context of EUROSPEECH '97, which was held on Rhodes in Greece.The technique used for the processing of the residual echo consists ofreplacing the low levels of the microphone signal with a syntheticcomfort noise, the high levels being transmitted without modification bythe processing. It entails the calculation of a cutoff threshold whichmust be sufficiently great not to create noise contrast during themoments of voice non-activity, and sufficiently low not to introducedistortions on the local voice activity. This compromise can be foundonly for a given use configuration, that is to say for a given coupling,noise level and user/microphone distance.

In the patent document EP-A-789 476, a system is described which isprovided on the one hand with echo cancellation means and on the otherhand background noise reduction means, each functioning in the frequencydomain. In particular, the elimination of the noise implemented by thenoise suppression means consists of estimating the power spectrum ofeach sub-band, estimating the noise spectrum and deducing therefrom thegain to be applied to the sub-band signal so that the noise is reduced.If the gain thus calculated is less than a minimum constant gain, thegain applied to the signal is then this minimum gain.

The system described in the patent document EP-A-789 476 also includesresidual echo elimination means, these means being active only in theperiods where the local user is himself active. It consists ofdetermining the echo elimination energy ratio and comparing this ratiowith a constant. If this ratio is less than this constant, then noaction is taken. On the other hand, if such is not the case, then amethod of reconformation of the spectrum using the noise spectrumanalysed for each band is implemented.

The system therefore performs a processing in which only thetransmission gain is modulated. This promotes the interactivity andintelligibility of the conversation, the signal received by the firsttransducer, that is to say the loudspeaker in the case of a “hands-free”device, not being able to be truncated.

Such a procedure for eliminating residual echo noise does however havethe drawback of resulting in attenuations of the noise which may beinordinate, giving rise to audible artefacts.

The present invention relates to a processing of the residual echo whichdoes not have such drawbacks. More particularly, it relates to aprocessing of the residual echo which introduces no perceptible effecton the noise, including under unfavourable conditions of use, forexample a high noise level, a variable noise, a noise exhibiting voiceactivity characteristics, a large number of persons in a room, areverberating room, etc. This processing must also be as independent aspossible of the characteristics of the acoustic coupling between thetransducers and be adapted to long or short pulse responses.

To this end, an echo processing device according to the invention is ofthe type which comprises a first transducer receiving a signalcomprising a part due to the activity of a distant user and a secondtransducer emitting a signal comprising a useful part due to theactivity of a local user, a background noise part and an echo part dueto coupling between the said transducers, the said echo processingdevice comprising an adaptive echo cancellation device adapted tocalculate, from the signal received by the said first transducer, anestimation of the said echo part of the signal emitted by the saidsecond transducer and subtracting the said estimation of the said signalemitted by the said second transducer in order to produce an outputsignal from the echo cancellation device. It is also of the type whichcomprises a device for processing the residual echo at the output of thesaid adaptive echo cancellation device, the said residual echoprocessing device comprising a gain control means modifying the saidoutput signal of the echo cancellation device, the said gain controlmeans comprising a first analysis means for distinguishing componentswhich make up the said echo part, a second analysis means foridentifying components which constitute the said background part, and acalculation means for determining a gain variation law, so as to reduceto the maximum possible extent the levels of the said components makingup the said echo part without substantially affecting the said usefulparts.

According to an essential feature of the present invention, the saiddevice has a compensation means for compensating for the effects of thesaid gain variation law on the said components making up the saidbackground noise part, the said compensation means comparing the levelof the output signal as it should be after application of the said gainvariation law at the level of a corresponding component making up thesaid background noise part determined by the said second analysis meansand, if it determines that the said level of the said output signal isless than the said level of the said component, modifies the gaindetermined by the said variation law so that the output signal modifiedby the said gain control means is at the level of the said componentmaking up the said background noise part.

According to the invention, a gain variation law is therefore initiallycalculated and, even before applying the gain resulting from thiscalculation, a compensation is effected. The initial gain variation lawis calculated, in a conventional manner, from the energies of thesignals of the transducers, the estimated echo signal, the residualsignal output from the echo cancellation device, and the backgroundnoise identified. Many known initial gain calculation procedures can beused. For example, the procedure described in the patent document FR-A-2748 184 can be used.

The role of the compensation means is in particular to avoid thebackground noise signal undergoing audible modifications because of theprocessing of the residual echo. In addition, the properties of thehuman psycho-acoustic apparatus are used, which means that the ambientnoise signal subjectively masks the residual echo signal.

Advantageously, the compensation means compares the mean energy of theoutput signal as it should be after application of the said gainvariation law to the mean energy of the background noise part evaluatedduring moments when the signal exchanged in the said communicationsignal have no useful part and, if it determines that the said meanenergy of the said signal is less than the said mean energy of thebackground noise part, modifies the gain determined by the saidvariation law so that the output signal modified by the said gaincontrol means is at the level of the said background noise.

Advantageously, the mean energy of the background noise part iscorrected by a coefficient for controlling the residual noise levelwhich will be transmitted.

According to another aspect of the present invention, the compensationmeans comprises a means for generating a simulation signal reproducingthe characteristics of the said background noise part, the said meansbeing activated when the said output signal is modified by the said gaincontrol means.

Here, the gain calculated by the initial gain variation law is kept asit is, but a simulation signal whose spectral characteristics are asclose as possible to those of the actual noise is generated and added tothe output signal. This allows a great magnitude of variation in gainfree of the noise contrast problems.

Advantageously, the simulation signal, weighted by a factor, is added tothe said output signal modified by the gain determined by the saidvariation law, the sum of the said weighting factor and of the said gainbeing equal to 1.

Advantageously, there is provided a means of detecting activity of theusers in order to adjust the said simulation signal generation meanswhen the users are inactive. It will generally be a case of a voiceactivity detector (VAD).

According to another aspect of the present invention, a firsttransformation means for passing from a time processing domain to aspectral processing domain and a second transformation means for passingto the spectral processing domain again are provided on each side of thesaid gain control means, the said components making up the echo part ormaking up the background noise part then taking the form of spectralcomponents of the said output signal.

Thus the processing is carried out in a transformed domain whichgenerally corresponds to Fourier harmonic analysis.

Advantageously, in the spectral domain, the spectral components of theoutput signal are analysed sequentially by frequency band samples, thesaid first analysis means distinguishing each component making up thesaid echo part, the said second analysis means identifying a spectralcomponent making up the said background noise part, the said calculationmeans determining a gain peculiar to a given spectral component, so asto reduce its level to the maximum possible extent if it makes up thesaid echo part, and the compensation means comparing the energy of theoutput signal as it should be after modification by the said gain, forthe said given spectral component, with the energy of the correspondingspectral component constituting the said background noise part and, ifit determines that the said energy of the output signal is less than thesaid energy of the said spectral component, modifying the said gain sothat the said given spectral component is at the level of the saidcorresponding background noise spectral component.

This processing in the spectral domain exploits here too thepsycho-acoustic properties of the human auditory apparatus, that is tosay simultaneous masking and frequency masking. In simultaneous voiceactivity situations, the spectral components which correspond to theactivity of the local user are not attenuated, or only a little. Theresidual echo signal is subjectively masked because of thepsycho-acoustic simultaneous masking property. As for the spectralcomponents which correspond to the echo alone, these are attenuateduntil they are returned to the level of the ambient noise. Themodification made will not interfere because of the frequency masking,that is to say the masking of a sound by another sound with a differentfrequency, by the useful part of the signal.

According to another aspect of the present invention, there is proposeda method of processing the echo in a communication system at a terminalcomprising a first transducer receiving a signal comprising a part dueto the activity of a distant user and a second transducer emitting asignal comprising a useful part due to the activity of a local user, abackground noise part and an echo part due to coupling between the saidtransducers, the said method comprising a first adaptive echocancellation step consisting of calculating, from the signal received bythe said first transducer, an estimation of the said echo part of thesignal emitted by the said second transducer and subtracting the saidestimation of the said signal emitted by the said second transducer inorder to produce an output signal. The said echo processing method ischaracterised in that it comprises a second step of processing the echoremaining after the said echo cancellation step, the said second stepconsisting of distinguishing elements which make up the said echo part,identifying elements which make up the said background noise part,determining a gain variation law modifying the said output signal so asto reduce to the maximum possible extent the levels of the saidcomponents making up the said echo part without substantially affectingthe said useful part, and compensating for the effects of the said gainvariation law on the said components making up the said background noisepart.

This processing can be carried out in a spectral domain, sequentially,by frequency band samples.

It can also be carried out in a time domain.

The features of the invention mentioned above, as well as others, willemerge more clearly from a reading of the following description of anexample embodiment, the said description being given in relation to theaccompanying drawings, amongst which:

FIG. 1 is a block diagram showing the functioning of an echo processingdevice according to a first embodiment of the present invention,

FIG. 2 is a block diagram showing the functioning of an echo processingdevice according to a second embodiment of the present invention, and

FIG. 3 is a block diagram showing the functioning of an echo processingdevice according to a third embodiment of the present invention.

With reference to FIG. 1, a first embodiment of the present inventionwill now be described.

An echo processing device 1 acts at a terminal of a communication systemcomprising a microphone 5 and a loudspeaker 4. The loudspeaker 4receives a signal corresponding to the voice activity of a distant userand the microphone 5 emits a signal comprising a useful part due to theactivity of a local user, a background noise part, and an echo part dueto coupling between microphone and loudspeaker.

Overall, the echo processing device 1 comprises an adaptive echocancellation device 3 and a residual echo processing device 2.

The adaptive echo cancellation device 3 acts between the input of theloudspeaker 4 and the output of the microphone 5. It comprises a finitepulse response filter 6. This filter is adapted to calculate, from thesignal received by the loudspeaker, an estimation of an echo part of thesignal emitted by the microphone. This estimation is subtracted from thesignal emitted by the microphone.

The residual echo processing device 2 acts at the output of the adaptiveecho cancellation device 3, that is to say the output signal processedby the adaptive echo cancellation device 3 is transmitted as an input tothis residual echo processing device 2.

Overall, the residual echo processing device comprises a spectraltransformation means 7 at the input and an inverse spectraltransformation means at the output 11, between which there acts aspectral gain modifying means 12, controlled by a spectral gaincalculation means 10 connected to an echo parameter calculation means 9and a noise parameter calculation means 8.

The spectral transformation means 7 is adapted to decompose the outputsignal from the echo cancellation device 3 into N frequency bandsamples. The transformation is carried out using a fast Fouriertransformation (FFT) algorithm. For applications where the samplingfrequency of the signals is established at 8 kHz, it is possible to usefor example a fast Fourier transformation algorithm on 256 frequencypoints, only 129 of which are used for the subsequent gain modificationcalculation.

The inverse spectral transformation means 11 is adapted to resynthesisethe signal in the time domain. For example, it may use an operation ofstraddling between successive frames, which requires synthesisprocedures of the WOLA (Weighted Overlap-Add) or WOSA (WeightedOverlap-Save) type.

The spectral gain modification means 12 is adapted to modify thespectral gains individually. It is controlled by the spectral gaincalculation means which, from information available on each spectralcomponent, determines a spectral attenuation for the spectral componentin question.

For each spectral component, a calculation of the initial spectralattenuation is carried out using the known procedure mentioned aboverequiring here knowledge of the spectral distributions of the energiesof the signal coming from the echo cancellation device, of thebackground noise signal, of the estimated echo signal, of the microphonesignal and of the loud-speaker signal. The echo parameter calculationmeans makes it possible to determine whether or not the spectralcomponent analysed corresponds to the echo alone. If such is the case,this component will be attenuated. Where it also corresponds to a usefulpart of the signal, that is to say corresponding to the voice activityof the local partner, it will not be attenuated, or only a little.

According to the invention, this initial spectral attenuation iscorrected by means of a supplementary procedure forming a compensationmeans. For each spectral component, this procedure verifies whether ornot the energy of the corresponding output signal as modified by theinitial spectral attenuation is less than the energy of thecorresponding spectral component of the background noise. If such is thecase, the procedure replaces the initially calculated gain with anactual gain equal to the square root of the energy of the noise dividedby the energy of the corresponding spectral component of the outputsignal. Thus this spectral component of the output signal will be takento the level of the corresponding spectral component of the backgroundnoise. Where the energy of the output signal is greater than or equal tothe energy of the background noise, the effective gain will be theinitially calculated gain. The background noise parameter calculationmeans enables the energy of the background noise spectral component tobe identified. The processing requires the implementation of a voiceactivity detection procedure in order to determine the moments when thespectral power density of the noise must be estimated. This detectionprocedure can be implemented at a frame rate over all the bandwidth ofthe signal, or, more finely, on each of the spectral components.

The procedures which have just been described can be executed by thefollowing algorithm:

-   -   for (freq=0, ΔF, . . . , NΔF)    -   G_(TX)(freq, pT)=gain_calculation_procedure (Energy_sig_in,        Energy_local_noise, Energy_echo, Energy_micro, Energy_LS)    -   if [G_(TX)(freq, pT)²×Energy_sig_in(freq, pT)<Energy_local_noise        (freq, PT)]        ${G_{Effective}\left( {{freq},{pT}} \right)} = \sqrt{\frac{{Energy\_ local}{\_ noise}\left( {{freq},{pT}} \right)}{{Energy\_ sig}{\_ in}\left( {{freq},{pT}} \right)}}$    -   else    -   G_(Effective)(freq, pT)=G_(TX) (freq, pT)    -   end if    -   sig_out(freq, pT)=G_(Effective) (freq, pT)×sig_in (freq, pT)    -   end for.

This procedure uses the properties of simultaneous masking and frequencymasking of the human auditory apparatus. In double speech situations,the spectral components corresponding to the voice activity of the localuser are not attenuated, or only a little, by the processing, whichpreserves the quality of the useful signal transmitted. The residualecho signal is subjectively masked because of the simultaneous maskingproperty of the auditory apparatus. On the other hand, the spectralcomponents which correspond to echo alone are attenuated by theprocessing until they are returned to the level of the correspondingcomponents of the background noise. These components thus modified willbe only partially perceived by the distant user, because of theproperties of frequency masking by the useful signal corresponding tothe voice activity of the local user.

With reference to FIG. 2, a second embodiment of the present inventionwill now be described.

The echo processing device 101 acts at a terminal in a communicationsystem comprising a microphone 5 and a loudspeaker 4. As in the previousembodiment, it comprises overall an adaptive echo cancellation device 3and a residual echo processing device 102.

The adaptive echo cancellation device 3 is identical to that which isdescribed in the first embodiment and the residual echo processingdevice 102 also acts at its output.

Overall, the residual echo processing device 102 comprises a means ofcalculating the local noise energy 115, at the input of which there istransmitted the signal output from the microphone 5, and a means ofcalculating the energy of the residual signal 114 at the input of whichthe signal output from the echo cancellation device 3 is transmitted,these means 114 and 115 both being connected to a means of calculatingthe initial transmission gain 110, itself connected to a transmissiongain calculation correction means 113 which in the end acts on theoutput signal of the echo cancellation device which it is adapted toattenuate.

The initial transmission gain calculation means 110 is adapted todetermine an initial gain variation law. Since the processing does not,unlike the previous embodiment, take place in a transformed domain, theinitial gain variation law varies only as a function of time. Thisinitial transmission gain calculation means 110 distinguishes the usefulparts of the output signal of the echo parts and determines a gainvariation law suitable for attenuating these. There is once again usedfor this the known procedure mentioned above requiring knowledge of theenergies of the signal coming from the echo cancellation device, fromthe background noise signal, from the estimated echo signal, from themicrophone signal and from the loudspeaker signal.

According to the invention, this initial attenuation is corrected bymeans of a supplementary procedure forming a compensation means. Thisprocedure compares the mean power of the signal present at the output ofthe echo cancellation device, given by the means of calculating theenergy of the residual signal 114, with the mean power of the backgroundnoise evaluated during the moments of voice non-activity, given by thelocal noise energy calculation means 115. In practice, this procedurechecks whether or not the mean power of the signal present at the outputof the echo cancellation device as modified by the initial gainvariation law is less than the mean power of the background noiseevaluated during the moments of voice non-activity divided by acoefficient K. If such is the case, the procedure replaces the initiallycalculated gain with an actual gain equal to the square root of the meanpower of the background noise evaluated during the moments of voicenon-activity divided by the power of the output signal multiplied by thecoefficient K. Thus this spectral component of the output signal will betaken to the level of the corresponding spectral component of thebackground noise divided by the coefficient K. Where the mean power ofthe output signal as modified by the initial gain variation law isgreater than or equal to the mean power of the background noiseevaluated during the moments of voice non-activity, the actual gain willbe the gain resulting from the application of the initial gain variationlaw. The parameter K makes it possible to control the residual noiselevel which will be transmitted to the distant user.

The procedures which have just been described can be executed by thefollowing algorithm:

-   -   G_(TX)(pT)=gain_calculation_procedure (Energy_sig_in,        Energy_local_noise,    -   Energy_echo, Energy_micro, Energy_LS)    -   if [G_(TX)(pT)²×Energy_sig_in(pT)<Energy_local_noise (PT)/K]        ${G_{Effective}({pT})} = \sqrt{\frac{{Energy\_ local}{\_ noise}({pT})}{{K \cdot {Energy\_ sig}}{\_ in}({pT})}}$    -   else    -   G_(Effective)(pT)=G_(TX)(pT)    -   end if    -   sig_out(pT)=G_(Effective)(pT)×sig_in (pT)

This procedure makes it possible to adapt, constantly over the course oftime, the depth of the variation in gain with respect to thecharacteristics of the residual echo signal. When the latter is highlyenergetic and therefore audible, this procedure aims to apply anattenuation so as to take this signal to the level of that of the noisemeasured in the local room corrected by the coefficient K. There aretherefore no marked contrasts in the background noise but a continuousadaptation of the variation in gain to the acoustic environment of thelocal user. By taking account of the psycho-acoustic properties of thehuman auditory apparatus, the residual echo signal is subjectivelymasked by the ambient noise. It is therefore not audible when listeningto the output signal modified by the residual echo processing device.

With reference to FIG. 3, a third embodiment of the present inventionwill now be described.

The echo processing device 201 acts at a terminal in a communicationsystem comprising a microphone 5 and a loudspeaker 4. As in the previousembodiments, it comprises overall an adaptive echo cancellation device 3and a residual echo processing device 202.

The adaptive echo cancellation device 3 is identical to the onedescribed in the first embodiment and the residual echo processingdevice 202 also acts at its output.

The residual echo processing device 202 comprises a local noise energycalculation means 215, at the input of which there is transmitted thesignal output from the microphone 5 by means of a voice activitydetection means 216, and a means of calculating the energy of theresidual signal 214 at the input of which the signal output from theecho cancellation device 3 is transmitted, these means 214 and 215 bothbeing connected to a transmission gain calculation means 210 which actson the output signal of the echo cancellation device which it is adaptedto attenuate. This residual echo processing device 202 also comprises ameans of calculating the parameters of the background noise 208, at theinput of which there is transmitted the signal output from themicrophone 5 by means of the voice activity detection means 216, thismeans 208 being connected to a comfort noise generating means 217adapted to emit a signal which, weighted by a value complementary tothat of the gain calculated by the transmission gain calculation means,will be added to the output signal of the echo cancellation device asattenuated by the application of this gain.

The initial transmission gain calculation means 210 is adapted todetermine, as in the previous embodiment, a gain variation law. Thisinitial transmission gain calculation means 210 distinguishes the usefulpart of the output signal from the echo parts and determines a gainvariation law able to attenuate these. The known procedure mentionedabove is once again used for this, and requires knowledge of theenergies of the signal coming from the echo cancellation device, fromthe background noise signal, from the estimated echo signal, from themicrophone signal and from the loudspeaker signal.

According to the invention, this attenuation is partly compensated forby a procedure based on the emission of a comfort noise, the applicationof the said procedure forming a compensation means.

The voice activity detection means detects whether a sampling period isa period in which the users are inactive.

If such is the case, the noise parameter calculation means 208calculates the fundamental parameters characterising the backgroundnoise surrounding the local user. For example, the characteristics ofthe noise can correspond to the coefficients of the linear predictionmodel (or to the equivalent representations such as the reflectioncoefficients, LAR or LSP) with which the energy of the residue of thisprediction is associated. These parameters are generally establishedfrom knowledge of the noise samples and the required prediction order.The choice of the latter parameter makes it possible to more or lessfaithfully reproduce the spectral characteristics of the noise actuallypresent in the local environment.

The comfort noise generating means 217 uses these parameters of thebackground noise in order to generate a signal simulating the backgroundnoise present in the local environment. The transmission gaincalculation means 210 calculates not only a gain value G_(TX) to beapplied to the output signal of the echo cancellation device, but also again value (1−G_(TX)) applied to the simulation signal emitted by thecomfort noise generating means. The signals coming from the echocancellation device 3 and from the comfort noise generating means 217thus modified by the transmission gain calculation means 210 are addedto each other in order to obtain a processed output signal which will betransmitted to the distant user.

If the processed output signal is designated sig_out(pT), the outputsignal of the echo cancellation device sig_in(pT), the signal simulationcomfort_noise(pT) and the calculated gain G_(TX)(pT), this gives, at agiven moment:sig_out(pT)=G _(TX)(pT).sig_in(pT)+[1−G _(TX)(pT)].comfort_noise(pT)

The comfort noise is therefore inserted only in the periods ofattenuation of the signal aimed at reducing the audible residual noise.Outside these periods, when the gain is substantially equal to 1, theoutput signal contains the natural background noise in its entirety. Inthese periods, the sum of the comfort noise level and of the naturalbackground noise level remaining after attenuation corresponds to thenatural background noise level without attenuation. The distant usertherefore does not perceive any noise contrast. In addition the naturalbackground noise is kept to the maximum extent. It is also possible, inthis embodiment, to allow large variations in gain, with a gain whichmay range from a value substantially equal to 1 to a value substantiallyequal to 0. The swing between these two states takes place in a veryflexible manner, without generating contrast, with continuous continuityin the characteristics of the signal transmitted to the distant user.

The calculation procedures used by the three devices which have justbeen described can be implemented by processors existing at the presenttime, in particular by floating arithmetic real-time signal processors(DSPs), for example the TMS320C3X and TMS320C4X processors from TexasInstruments, or the AD21061 processor from Analog Devices.

With regard to the estimation of the energy of a signal used by thethree devices which have just been described, this estimation can becarried out using a first-order infinite pulse response digitalfiltering according to the equation:Signal_energy_(—) X(pT)=α.Signal_energy_(—) X[(p−1)T]+(1−α).X ^(N)(pT).

Signal_energy_X represents the energy of the signal which it is soughtto obtain. X represents the level of the sampled signal. N is an integerequal to 1 in the case of an amplitude estimation and equal to 2 in thecase of an energy estimation. The value of the parameter α determinesthe time constant of the filter, this constant if necessary being ableto be adapted in the course of time vis-à-vis the characteristics of thesignals to be processed.

It is also possible to use two different time constants, one, theshorter, for the rise time and the other, longer, for the fall time. Theestimation then takes place according to the equation:Signal_energy_(—) X(pT)=α_(f).Signal_energy_(—) X[(p−1)T]+(1−α_(f)).X^(N)(pT),for signal_energy_(—) X[(p−1)T]≧.X ^(N)(pT)Signal_energy_(—) X(pT)=α_(f).Signal_energy_(—) X[(p−1)T]+(1−α_(f)).X^(N)(pT),for signal_energy_(—) X[(p−1)T]<.X ^(N)(pT)

Finally, it is possible to make an estimation with monitoring of peaksin accordance with the following procedure:

if X^(N)(pT) > Signal energy_X[(p-1)T] then Signal_energy_X(pT) =X^(N)(pT), otherwise Signal_energy_X(pT) = α. Signal_energy_X[(p-1) T] +(1-α) . X^(N)(pT).

With regard to the calculation of the initial gains used by the threedevices which have just been described, this calculation can, asindicated above, be carried out in accordance with the known proceduredescribed in particular in the patent document FR-A-2 748 184, where thetransmission gain variation law is established according to the levelsmeasured at the loudspeaker and the recording microphone. Other knownprocedures for calculating the gain variation law can also be applied.

For uncontrolled environments in which the acoustic characteristics areliable to change constantly over time, for example in the case ofmultiple users, in the case of users moving about, or background noiseswhich are difficult to model, it is preferable to use the firstembodiment described. This is because processing in the spectral domainbest makes it possible to avoid the many problems mentioned above.

For better controlled environments in which the ambient noise can easilybe modelled, use will advantageously be made of the device correspondingto the second embodiment of the present invention, this device making itpossible to mask the echo residue with the ambient noise.

However, in some types of acoustic environment, for example a room inwhich many persons not taking part in the conversation are discussingand moving about, this second type of device cannot overcome all thenoise contrast problems. The third embodiment of the present inventionwill then advantageously be used.

As a general rule, it will be advantageous to install the echocancellation device and the residual echo processing device on the samesignal processor. It will therefore be necessary for these two devicesto function in the same domain. In other words, for an echo cancellationfrequency processing using algorithms such as MDF and GMDF, it isdesirable for the echo cancellation device to be supplemented by aresidual echo processing device according to the first embodiment of thepresent invention. On the other hand, for an echo cancellation algorithmworking in the time domain, such as LMS and NLMS, it is desirable forthe echo cancellation device to be supplemented by a residual echoprocessing device according to the second embodiment or the thirdembodiment of the present invention.

The three devices described are aimed at modifying the residual echosignal so that the latter is inaudible within the signal transmitted tothe distant user, because of the simultaneous masking properties,relating to time and frequency, inherent in the human auditory system.

These devices do not have excessive complexity and in particular they donot consume an excessive quantity of calculation time.

Although conceived originally for processing the acoustic echo in“hands-free” communication devices at a terminal, these devices could beadapted to deal with these same echo problems within a telecommunicationnetwork itself, for example at the switches or transcoders, or even fordealing with the electrical echo problems caused by hybrid connections.

1. A terminal for processing an echo, the terminal being part of acommunication system, the terminal comprising: a first transducer forreceiving a signal, the signal including a part due to activity of adistant user; a second transducer for emitting a second signal, thesecond signal including (a) a useful part due to activity of a localuser, (b) a background noise part, and (c) an echo part due to couplingbetween said first and second transducers; an adaptive echo cancellationdevice adapted to (a) calculate, from the first signal received by saidfirst transducer, an estimate of the echo part of the second signalemitted by said second transducer, and (b) subtract the estimate of thesecond signal emitted by said second transducer to produce an outputsignal from the echo cancellation device; a device for processing theresidual echo at the output of said adaptive echo cancellation device,said residual echo processing device comprising: a gain controller formodifying said output signal of the echo cancellation device, said gaincontroller including a first analyzer for distinguishing componentswhich make up said echo part; a second analyzer for identifyingcomponents which constitute said background part; and a calculator fordetermining a gain variation law, so as to reduce to the maximumpossible extent the levels of said components making up said echo partwithout substantially affecting said useful parts; and a compensator forcompensating for the effects of gain variation law on said componentsmaking up said background noise part, said compensator being arrangedfor (a) applying a modified gain such that the output signal is at thelevel of said component making up said background noise if the level ofthe output signal as it should be after application of said gainvariation law is less than the level of a corresponding component makingup said background noise part determined by said second analyzer, and(b) keeping the gain as determined by said variation law if the level ofthe output signal as it should be after application of said gainvariation law is not less than the level of a corresponding componentmaking un said background noise part determined by said second analyzer.2. The terminal according to claim 1, wherein said compensator isarranged for (a) determining the mean energy of the output signal as itshould be after application of said gain variation law to the meanenergy of the background noise part evaluated during moments when thesignals exchanged in said communication system have no useful part and(b) modifying the gain variation law so that the output signal modifiedby said gain control means is at the level of said background noise partin response to the determined said mean energy of the signal being lessthan said mean energy of the background noise part.
 3. The terminalaccording to claim 2, wherein said mean energy of the background noisepart is arranged to be corrected by a coefficient for controlling theresidual transmitted noise level.
 4. The terminal according to claim 1,wherein the compensator comprises a simulation signal generator forreproducing the characteristics of said background noise part inresponse to said output signal being modified by said gain controller.5. The terminal according to claim 4, wherein the simulation signal,weighted by a factor, is added to said output signal modified by thegain determined by said variation law, the sum of said weighting factorand of said gain being equal to
 1. 6. The terminal according to claim 5,further comprising a detector for detecting the activity of the user taradjusting the simulation signal generator when the users are inactive.7. The method terminal according to claim 4, further comprising adetector for the activity of the user for adjusting the simulationsignal generator when the users are inactive.
 8. The terminal accordingto claim 1, further comprising a first converter for passing from timeprocessing domain to a spectral processing domain and a second converterfor passing back to the time processing domain again the first andsecond converters being on opposite sides of the gain controller, theparts of the first and second signals farming the echo part or thebackground noise part taking the form of spectral components of saidoutput signal.
 9. The terminal according to claim 8, wherein the specialcomponents of the output signal are analyzed sequentially by frequencyband samples, said first analyzer being arranged far distinguishing eachcomponent making up said echo part, said second analyzer being arrangedfor identifying a spectral component making up said background noisepart, said calculator being arranged for determining a gain peculiar toa given spectral component far reducing its level to the maximum extentif the spectral component forms said echo part, and said compensatorbeing arranged for (a) modifying said gain so that said given spectralcomponent is at the level of said corresponding background noisespectral component if the energy of the output signal as it should beafter modification by the said gain, for said given spectral component,is less than the energy of the corresponding spectral component makingup said background noise part, and (b) keeping the gain as determined bysaid variation law if the energy of the output signal as it should beafter modification by the said gain, for said given spectral component,is not less than the energy of the corresponding spectral componentmaking up said background noise part.
 10. An echo processing method in acommunication system at a terminal having a first transducer receiving afirst signal including a part due to activity of a distant user and asecond transducer emitting a second signal including a useful part dueto activity of a local user, a background noise part, and an echo partdue to coupling between said transducers, said method comprising: afirst adaptive echo cancellation step including (a) calculating, fromthe first signal received by said first transducer, an estimate of saidecho part of the second signal emitted by said second transducer, and(b) subtracting said estimate of said second signal emitted by saidsecond transducer in order to produce an output signal; a second step ofprocessing the echo remaining after said echo cancellation step, saidsecond step including (a) distinguishing components which make up saidecho part, (b) identifying components which make up said backgroundnoise part, and (c) determining a gain variation law modifying saidoutput signal so as to reduce to the maximum extent the levels of saidelements making up said echo part without substantially affecting saiduseful part; and compensating for the effects of said gain variation lawon said components making up said background noise part by (a) modifyingthe gain determined by said variation law so that the output signalmodified is at the level of said component making up said backgroundnoise part if the level of the output signal as it should be afterapplication of said gain variation law is less than the level of acorresponding component making up said determined background noise part,and (b) keeping the gain as determined by the gain variation law if thelevel of the output signal as it should be after application of saidgain variation law is not less than the level of a correspondingcomponent making up said determined background noise part.
 11. Themethod according to claim 10, wherein the processing step of said secondecho processing step is carried out in a spectral domain, sequentially,by frequency band samples.
 12. The method according to claim 11, whereinsaid second echo processing step is carried out in a time domain.
 13. Aterminal for processing an echo, the terminal being part of acommunication system, the terminal comprising a first transducer forreceiving a signal, the signal including a part due to activity of adistant user and a second transducer for emitting a second signal, thesecond signal including (a) a useful part due to the activity of a localuser, (b) a background noise part and (c) an echo part due to couplingbetween the transducers, an adaptive echo cancellation device beingadapted to (a) calculate, from the first signal received by said firsttransducer, an estimate of the echo part of the second signal emitted bysaid second transducer and (b) subtract the estimate of the secondsignal emitted by said second transducer to produce an output signalfrom the echo cancellation device, a device for processing the residualecho at the output of said adaptive echo cancellation device, the saidresidual echo processing device comprising a gain controller formodifying said output signal of the echo cancellation device, said gaincontroller including a first analyzer tar distinguishing componentswhich make up said echo part, a second analyzer for identifyingcomponents which constitute said background part, and a calculator fordetermining a gain variation law, so as to reduce to the maximumpossible extent the levels of said components making up said echo partwithout substantially affecting said useful parts, a compensator forcompensating for the effects of said gain variation law on saidcomponents making up said background noise part, said compensator beingarranged for (a) comparing the level of the output signal as it shouldbe after application of said gain variation law at the level of acorresponding component making up said background noise part determinedby the said second analyzer and (b) modifying the gain determined bysaid variation law so that the output signal modified by said gaincontroller is at the level of said component making up said backgroundnoise part in response to the determined level of said output signalbeing less than said level of said component; wherein the compensatorcomprises a simulation signal generator for reproducing thecharacteristics of said background noise part in response to said outputsignal being modified by said gain controller.
 14. The terminalaccording to claim 13, wherein the simulation signal, weighted by afactor, is added to said output signal modified by the gain determinedby said variation law, the sum of said weighting factor and of said gainbeing equal to
 1. 15. The terminal according to claim 14, furthercomprising a detector for detecting the activity of the user foradjusting the simulation signal generator when the users are inactive.16. The method terminal according to claim 13, further comprising adetector for the activity of the user for adjusting the simulationsignal generator when the users are inactive.
 17. Echo processing methodin a communication system at a terminal having a first transducerreceiving a first signal including a pert due to the activity of adistant user and a second transducer emitting a second signal includinga useful part due to the activity of a local user, a background noisepart, as well as an echo part due to coupling between said transducers,said method comprising: a first adaptive echo cancellation stepincluding (a) calculating, from the first signal received by said firsttransducer, an estimate of said echo part of the second signal emittedby said second transducer, and (b) subtracting said estimate of saidsecond signal emitted by said second transducer in order to produce anoutput signal, a second step of processing the echo remaining after saidecho cancellation step, said second step including (a) distinguishingcomponents which make up said echo part, (b) identifying componentswhich make up said background noise part, and (c) determining a gainvariation law modifying said output signal so as to reduce to themaximum extent the levels of said elements making up said echo partwithout substantially altering said useful part, and compensating forthe effects of said gain variation law on said components making up saidbackground noise part by (a) comparing the level of the output signal asit should be after application of said gain variation law with the levelof a corresponding component making up said determined background noisepart, and (b) modifying the gain determined by said variation law sothat the output signal modified is at the level of said component makingup said background noise part in response to the comparison indicatingsaid level of said output signal is less than said level of saidcomponent, the compensating step including simulating reproduction ofthe characteristics of said background noise part in response to saidoutput signal being modified by said gain controller.
 18. The methodaccording to claim 17, wherein the processing step of said second echoprocessing step is carried out in a spectral domain, sequentially, byfrequency band samples.
 19. The method according to claim 18, whereinsaid second echo processing step is carried out in a time domain.